Expired user account, code refactoring