make a the collapse div with the align to the left:
and the non collapsable elements inside a div with the align to the right
like this:
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Project name</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- THIS WILL COLLAPSE-->
<div class="navbar-collapse collapse navbar-left">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div>
<!-- THIS WILL NOT COLLAPSE -->
<div class="nav navbar-nav" >
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" placeholder="Usuario" class="form-control">
</div>
<div class="form-group">
<input type="password" placeholder="Contraseña" class="form-control">
</div>
<button type="submit" class="btn btn-success">Conectarse</button>
</form>
</div>
</div>
</div>