Updated server for login and register