Create login_tools.php

Functions to handle the input actions on the login page.