added login and logoff features