Moved check username logic from controller action to query handler