Rework backend logic. Better separation of MVC layers, use actual DB (Mongo). Also use MongoDB Geospatial Search to find users near.