tidied up user creation/login