Messing with form data handling and separated login related things to their own file.