refactored logged-in assignment into own middleware
one-line ns
merged development