Implement Streams/image/preview and clean up lots of stuff
Fixed edge cases for login/logout and permissions