class SecurityServiceImpl extends RemoteServiceServlet implements SecurityService {

	@Override
	public void logout() {
		try {
			Session session = ServiceUtil.validateSession(getThreadLocalRequest());
			if (session == null)
				return;

			FileUtils.forceDelete(UserUtil.getUserResource(session.getUserId(), "temp"));
			log.info("User {} logged out and closed session {}", session.getUsername(), session.getSid());
			kill(session.getSid());
		} catch (Throwable e) {
			log.error(e.getMessage(), e);
		}
	}

}