Added check for user's active flag on log in