createAccount, login, abstracted code, worked on device