added and refined register and login thingy.