checking for login before sending username