Switched to using 'required' instead of javascript function check for logging in