Added error handling to login and register. Made salt a bit more random.