Finished login and logout using cookies