Improve OC-Dev testing
Rewrite PHP-Unit tests

Adding more login tests, see #276 and #277
Fix login issues

see #276 and #277
Adding login unit tests

see #276 and #277