logging user input in sessions and return them back