login logout functionality working