Add before action logged_in_user & improve edit tests