Added Register and Login functionality