Core pr 5

Fixed some user redirects and coding style.
Why is this not handled using the permission system?