Implemented login API call