implement login and register class

implement both class and its connection to server and UI