Get logged-in user id in controller Check if a user is logged-in in the application