implemented the login-serverlogic