Minecraft like authentication system in java