Finished implementing login and logout