clean up
json response
Implemented login functionality