Added if clause to current_user method to prevent errors if there is no current session.