         user.authToken = json["token"].stringValue
 
         LoginService.user = user
-
-        NSLog("success!")
-
 
         open_destination()
     }


        if let username = self.username.text, let password = self.password.text
            where username.characters.count > 0 && password.characters.count > 0 {

                let parameters: Dictionary<String, AnyObject> = [
                    "username": username,
                    "password": password
                ]

                SVProgressHUD.showWithMaskType(SVProgressHUDMaskType.Black)
                LoginService.request(.POST, "", parameters: parameters).validate()
                    .responseJSON() { response in
                        SVProgressHUD.dismiss()


                        if response.result.isSuccess {
                            switch response.response!.statusCode {
                            case 201:
                                self.login(response.result.value!)

                            default:
                                print("perform_login action: unknown status code")
                            }
                        }
                }

        } else {
            let alert = UIAlertController(title: nil, message: "Please enter your username and password.", preferredStyle: .Alert)
            alert.addAction(UIAlertAction(title: "Ok", style: .Default, handler: nil))

        }
    }

    func save_token(result: AnyObject) {

        var json = JSON(result)

