implementation of login/logout on profile