hooked up the login functionality with the server hook
Added finishing touches to the login portion of rest api