<div class="container">
            <div class="section">
                
                <div class="row">	            
					<div class="input-field col s6">
						<input id="username" type="text"   name="username" >
						<label for="username">Username</label>
					</div>
				</div>
				<div class="row">
					<div class="input-field col s6">
						<input id="email" type="text"   name="email" >
						<label for="email">email</label>
					</div>
				</div>
				<div class="row">
					<div class="input-field col s6">
						<input id="password" type="password"   name="password" >
						<label for="password">password</label>
					</div>
				</div>    
				<div class="row">
					<div class="input-field col s6">

                        <a  class='waves-effect waves-light btn'  onclick=''>Register</a> &nbsp;&nbsp;&nbsp;&nbsp;
						<button id="btnFacebook" name="btnFacebook" class="loginBtn loginBtn--facebook">
						  Login with Facebook
						</button>
					</div>
				</div> 				
            </div>
        </div>
<script type="text/javascript" language="javascript">

    $(document).ready(function() {
        $("#btnFacebook").click(function(){
            window.location = "http://rosetaxis.dedicated.co.za:13085/login/facebook/math";
        });
    });

    function register()
    {
        var username = $("#username").val();
        var email = $("#email").val();
        var password = $("#password").val();
            
        var URL = "http://rosetaxis.dedicated.co.za:13085/register/"+username+"/"+email+"/"+password;
        console.log(URL);
        $.ajax({
            url: URL,
            dataType: "jsonp",
            cache: false,
            timeout: 50000,
            jsonpCallback: "resultCall",
            success: function(data) {
                var raw = "name="+ username + "&email="+ email;;
                window.location = '?page=validauth&'+raw;     
                                
            },
            error: function(jqXHR, textStatus, errorThrown) {
                alert("An Error occured. Please try again later.");
                //window.location = "clients";
            }
        });
    }
</script>