implement sending POST request to server when login