Converted files to unix since some of them used dos newlines. Corrected logout to update session field in database