gets user name from form, converts it into user id and stores it in local storage