Added login and logout endpoints and use on site