Moved to before action as to not interfere with csrf