refactor login form
removed unused settings sidebar
add api_login_required wrapper