added logout and login functionality across pages