login and logout functions added