Cleaned up createSession api
Strip whitespace and cast to number (expires)