Separated authentication into separate file