title: Infinite loop active record
body: <p>When the user attempts to login and enters a username that doesn't exist along with their password what I want the method called existing_user to do is to continue to show the login menu (login_screen_selection). The problem is that once the menu appears again and the user enters '1' which is supposed to prompt them for the username again, the program terminates. I want the method to behave like an infinite loop that can only break if you enter a username that already exists</p>
  
  <pre class="lang-rb prettyprint-override"><code>def process_login
    case login_screen_selection
    when '1'
      existing_user
    when '2'
      create_account
    when '3'
      exit_application
    else
      process_login
    end
  end
  
  def login_screen_selection
    puts "1. Login"
    puts "2. Create account"
    puts "3. Exit"
    gets.chomp
  end
  
  def existing_user
    puts "Please Enter Username"
    get_username = gets.chomp
  
    puts "Please Enter Password"
    get_password = gets.chomp
  
    customer = Customer.find_by(
      username: get_username,
      password: get_password
      )
  
    if customer.nil? do
      puts 'Sorry, username and/or password combination not valid. Please try again'
      login_screen_selection 
      break if !customer.nil?
    end
  end
  </code></pre>