Added offline ability and debug login. IGNORE