Added logging out and optimized current_user