User input handling

Method to take user input with buffer overflow protection