added log out capability and login_required for user_detail