edited condition on login function and error message (globs.js)