Adding java files. Almost all files are grabbed from mrapp login branch