Updated Login and Register Functions

Login and register are complete and working for the time being.