Added check on login