Added logout and login api endpoints