Secure app and separate files into client and server