Refactored unit tests

* Added RblgBaseTestCase base class for common functionality
* Most test cases now derive from this calss and use its login
/ logout functions
* Made username column in User model unique