improved password storage, added check for new user