added current user method and ensure_logged_in method