added button listener and login function to client