added check for login;