functional login and logout!