use middleware to check whether user has been logged in or not
clean up a bit
clean up User router class