Refactored tests to be able to test behaviour when no flash
remove dumb code
Add support for session-less reporting of login errors