Fixed several small bugs causing the login process to fail on Openshift