Added a functional Login page
-Made some other changes to be able to re-use code