Login and Register via php

Login will save last user in the database.
When registering the user is assumed to be logging in
in other words will be logged in after they register