Indigo Consulting interview question

Logic for implementing a secure login webform.