     }
     
     func updateLocation(){
-        self.user = UserService.getUserInSession()
         self.user.state = User.State.ONLINE
         let currentLocation = locationManager.location!.coordinate
         self.user.latitude = currentLocation.latitude


class MapViewController: UIViewController, UISearchBarDelegate, CLLocationManagerDelegate, MKMapViewDelegate {
    let apiService = APIService()
    var searchController:UISearchController!
    var annotation:MKAnnotation!
    var localSearchRequest:MKLocalSearchRequest!
    var localSearch:MKLocalSearch!
    var localSearchResponse:MKLocalSearchResponse!
    var error:NSError!
    var pointAnnotation:MKPointAnnotation!
    var pinAnnotationView:MKPinAnnotationView!
    var menuExpanded = false
    var locationManager = CLLocationManager()
    var users : [User] = []
    var user : User = User()
    
    var pusher : Pusher = Pusher(key: "")
    var channels : [PusherChannel] = []
    

        }
    }
    
    func initSearchField() {
        let paddingView = UIView(frame: CGRectMake(0, 0, 25, self.searchTextField.frame.height))
        self.searchTextField.leftView = paddingView
        self.searchTextField.leftViewMode = UITextFieldViewMode.Always
