Refactor the signin form to use form_tag in place of form_for
Defined some utility functions to decouple tests from implementation