Login/logout functionality and search api endpoint

Initial version of login/logout and search api endpoint completed.