@Override
public CurrentUserDto get() {
HttpSession session = sessionProvider.get();
Long currentUserId = (Long) session.getAttribute(SecurityParameters.getUserSessionKey());
UserDto userDto = null;
if (currentUserId != null) {
userDto = User.createDto(userDao.get(currentUserId));
}
boolean isLoggedIn = userDto != null;