add validation to handleLoginPost