added devise code for login/log out