Updates to login logic

Handle Inactive user accounts better.

For unauthorized users, have CAS redirect to $sugar_config['site_url']
rather than the server name.