Fixes #640 Login captcha has multiple errors

Ok here we go. Removed unneccessary if's and variables to make the code readable and fixes all issues mentioned in #640