Add a timeout and timeout command line option
Fix wrong variables in the login method