added auth structure on app
added referer fix