Should wait for login page before doing login

Signed-off-by: Michal Čihař <michal@cihar.com>