On the login page: If the user is already logged on or if there are cookies or there is a valid session, he will be redirected to the member page. If the log in form isn't
complete or the username or the password is wrong, the function will return the error variable. In areas for members only: If the user isn't logged on or there aren't any
cookies or the session terminated, the user will be redirected to the login page. In the logout page: The user will be logged out.