Added a check for 'active' when signing in users