Updated getUser to have aerror handling.