Added conditional processing if login credentials aren't provided in ActiveRecord