Authentication implemented

Authentication implemented on server and client
Found a way of making custom permissions
saveLatticeInfo authorization prototype