Changed the logout URL

If somebody presses login twice, logout was not working. So this commit
eliminates that bug.
Used jsoup library to prevent catastrophic backtracking

Sometimes login was not working and needs restarting application to work
again. This was happening because of the catastrophic backtracking in regex.
So jsoup is used to extract the form itself to prevent it.