login/logout complete functionality