Implement tests for util functions
Extend existing view tests and add test for 'logout' view (was missing before)