login controller, api methods added